<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="Definitions_1" targetNamespace="http://camunda.org/schema/1.0/bpmn">
  <process id="terminateEndEventExample" isExecutable="true">
    <extensionElements>
      <camunda:executionListener 
        class="org.camunda.bpm.engine.test.bpmn.executionlistener.RecorderExecutionListener" 
        event="end" />
    </extensionElements>
  
    <startEvent id="start"/>
    <sequenceFlow id="flow1" sourceRef="start" targetRef="fork"/>
    <parallelGateway id="fork"/>
    
    <sequenceFlow id="flow2" sourceRef="fork" targetRef="outerTask"/>
    <userTask id="outerTask"/>
    <sequenceFlow id="flow5" sourceRef="outerTask" targetRef="end2"/>
    <endEvent id="end2"/>
    
    <sequenceFlow id="flow3" sourceRef="fork" targetRef="subProcess"/>
    <subProcess id="subProcess">
      <startEvent id="innerStart"/>
      <sequenceFlow id="flow4" sourceRef="innerStart" targetRef="innerEnd"/>
      <endEvent id="innerEnd">
        <terminateEventDefinition id="termination"/>
      </endEvent>
    </subProcess>
    
    <sequenceFlow id="flow6" sourceRef="subProcess" targetRef="end1"/>
    <endEvent id="end1"/>
  </process>
</definitions>